/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package modele;

/**
 * @author Hadrien
 */

public abstract class Order {
    public var description: String;
    public var name: String;
    public var quantity:Integer = 1 on replace {doSubTotal()};
    public var price: Number = 0 on replace{doSubTotal()};
    public var subTotal: Number;
    public-init var orderList: OrderList;

    public abstract function deliver():Void;

    public function doSubTotal () {
        subTotal = price*quantity;
        orderList.doTotal();
    }
}
